gitweb: Incremental blame
PATCH 1/1 gitweb: Incremental blame
This is a proof of concept patch to add support for incrementally displaying author data in the blame view.
It has been lightly tested in a couple of browsers (Firefox, Mozilla, Konqueror, Galeon, Opera and IE6).
There are a couple of issues with this patch:
* If it is going to be merged, we probably need to fallback to the old non-incremental blame view as the current code does not work in all browsers. Furthermore, not all browsers support javascript. I am not sure how this should be done.
* For some unknown reason it does not work in Epiphany.
* In IE6, all author data is eventually shown, but it is not done incrementally.
Any comments or suggestions for how to fix any of the issues above is greatly appreciated.
---
Makefile | 6 +- git-instaweb.sh | 7 ++ gitweb/blame.js | 193 ++++++++++++++++++++++++++++++++++++++++++++++++++++ gitweb/gitweb.perl | 112 ++++++++++++++++++++++++++++++ 4 files changed, 316 insertions(+), 2 deletions(-)
Makefile +5 -1
@@ -139,6 +139,7 @@ GITWEB_HOMETEXT = indextext.html GITWEB_CSS = gitweb.css GITWEB_LOGO = git-logo.png GITWEB_FAVICON = git-favicon.png +GITWEB_BLAMEJS = blame.js GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER =
@@ -691,13 +692,14 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \ -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \ -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \ + -e 's|++GITWEB_BLAMEJS++|$(GITWEB_BLAMEJS)|g' \ -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \ -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \ $< >$@+ chmod +x $@+ mv $@+ $@ -git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/blame.js rm -f $@ $@+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
@@ -706,6 +708,8 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css -e '/@@GITWEB_CGI@@/d' \ -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \ -e '/@@GITWEB_CSS@@/d' \ + -e '/@@GITWEB_BLAMEJS@@/r gitweb/blame.js' \ + -e '/@@GITWEB_BLAMEJS@@/d' \ [email protected] > $@+ chmod +x $@+ mv $@+ $@
git-instaweb.sh +7 -0
@@ -233,8 +233,15 @@ gitweb_css () { EOFGITWEB } +gitweb_blamejs () { + cat > "$1" <<\EOFGITWEB +@@GITWEB_BLAMEJS@@ +EOFGITWEB +} + gitweb_cgi $GIT_DIR/gitweb/gitweb.cgi gitweb_css $GIT_DIR/gitweb/gitweb.css +gitweb_blamejs $GIT_DIR/gitweb/blame.js case "$httpd" in *lighttpd*)
gitweb/blame.js new file +193 -0
193 lines not on this page · raw message
gitweb/gitweb.perl +111 -1
130 lines not on this page · raw message